﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DAL;
using DAL.DBInteractions;
using POCOS;

namespace WcfDemo
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "UserService" in both code and config file together.
    public class UserService : IUserService
    {
        private readonly IUnitOfWork _unitofwork;
        public UserService(IUnitOfWork unitofwork)
        {
            this._unitofwork = unitofwork;

        }
        public UserService()
        {

        }
        AuteurContext db = new AuteurContext();
        public UserProfile GetUsers()
        {
            var users = db.UserProfiles.FirstOrDefault();
            if (users != null)
            {
                return users;
            }
            else
            {
                return null;
            }

        }
    }
}
